import { defineConfig } from "vite";
import uni from "@dcloudio/vite-plugin-uni";
import Components from "unplugin-vue-components/vite";
import AutoImport from "unplugin-auto-import/vite";
import {
	customApiResolver,
	customComponentResolver,
	customConstantsResolver,
	customStoreResolver
} from "./internal/CustomResolver";

export default defineConfig({
	plugins: [
		uni(),
		AutoImport({
			dts: "typings/auto-imports.d.ts",
			imports: ["vue", "vue-router"],
			resolvers: [customConstantsResolver, customStoreResolver, customApiResolver]
		}),
		Components({
			deep: true,
			dts: "typings/components.d.ts",
			resolvers: [customComponentResolver]
		})
	]
});
